Optimizing performance of a drilling assembly

ABSTRACT

A system and method for optimized control of an assembly for drilling a borehole comprises a self-tuning, multivariable controller and an optimization engine that manipulates the setpoints of the controller such that drilling performance may be continuously optimized. The method includes evaluation of a characteristic system time constant, using this constant to compute bit ROP, using computed ROP to compute process gains, which are used to tune the multivariable controller, automatically refining controller setpoints based on controller performance, and using an optimization engine to systematically adjust controller setpoints such that drilling parameters are optimized based on any of several performance indicators, or a weighted combination of performance indicators. The method further comprises using at least one performance indicators which may be computed using estimated bit ROP: bit wear parameter; gradient of cost per foot; gradient of bit ROP versus WOB; simplified mechanical specific energy; and hydraulic specific energy.

CROSS REFERENCE TO EARLIER APPLICATIONS

This is a Continuation application of U.S. application Ser. No.14/432,675, filed 31 Mar. 2015, which is a national stage application ofInternational application No. PCT/US2013/062211, filed 27 Sep. 2013,which claims priority from U.S. provisional application No. 61/709,208,filed 3 Oct. 2012. The disclosures of the International application No.PCT/US2013/062211 and the U.S. provisional application No. 61/709,208are incorporated herein by reference.

TECHNICAL FIELD OF THE INVENTION

The present invention relates to a system and method for optimizing thedrilling performance of a drilling assembly for drilling a borehole inan earth formation.

BACKGROUND OF THE INVENTION

Wellbores are generally drilled using a drilling rig that supports androtates a drill string having a drill bit at its lower end. Drillingrigs employ either a block and tackle or hydraulic means to raise andlower the drillstring, and may employ a rotary table or a top drive torotate the drillstring. Fluid is circulated through the drillstring andbit to clean the bit and wellbore. A downhole motor or turbine issometimes used near the bit to allow drilling to progress with orwithout rotation of the drillstring at the surface; for example, whendirectional drilling operations are conducted.

The drillstring initially hangs in tension with its weight supported bya hook on the travelling portion of the suspension system. The hook alsosupports the top drive or Kelly and swivel used to rotate and circulatethrough the drillstring. The total load carried by the hook is commonlyreferred to as hook load (HL), and is often reported in units of poundsforce or Newtons.

The drilling sequence typically begins by increasing the pump strokesper minute (SPM) until a desired flow rate (Q) of drilling fluid,typically expressed in gallons per minute or litres per minute, iscirculated through the drillstring and borehole. The pump pressure(P_(p)), typically expressed in pounds per square inch or bar, requiredto circulate at a given flow rate with the bit off bottom is hereinreferred to as the off-bottom pressure or pressure tare (PT). Bitrotation is then established by rotating the drillstring at the surfaceand/or by pumping through a downhole motor or turbine. Bit rotationspeed ω_(b), typically expressed in revolutions per minute (RPM), iscomputed from the sum of surface rotation speed ω_(s) and motor/turbinerotation speed ω_(m), where the latter is typically computed as theproduct of flow rate and a motor/turbine factor with units of rotationsper unit volume of fluid circulation.

The drilling sequence continues by lowering the drillstring into thewell via the suspension system. When the bit makes contact with thebottom of the hole, a portion of the weight of the drill string isconsumed at the bit-formation interface as the bit penetrates theformation. This load is commonly referred to as the weight on bit (WOB),and is typically expressed in pounds force or Newtons. WOB is computedby subtracting the instantaneous hook load with the bit on bottom fromthe value recorded with the drillstring off bottom, herein referred toas the off-bottom hook load or hook load tare (HLT).

Torque, usually expressed in foot-pounds or Newton-meters, must beapplied at the surface to rotate the drillstring and/or counteract thetorque generated by the downhole motor as the bit drills ahead. Thetorque required to rotate the drillstring while the bit is off bottom isreferred to herein as the off-bottom torque or torque tare (TT). Thetorque consumed by the bit as it drills ahead, herein referred to as thetorque on bit (TOB) or differential torque, may be computed bysubtracting the torque tare from the instantaneous torque measured withthe bit on bottom. TOB is, in general, proportional to WOB.

The circulation pressure with the bit on bottom may be higher than thatwith the bit off bottom, especially when a downhole motor or turbine isused. The difference between the instantaneous pump pressure when thebit is on bottom and the pressure tare is referred to herein as thedifferential pressure (DP). When a downhole motor is used, DP isdirectly proportional to the output torque of the motor, which, formotors placed near the bit, is equivalent to TOB. Manufacturers ofdownhole motors often publish tables or charts showing the constant ofproportionality between DP and motor output torque, often expressed interms of foot-pounds per psi or Newton-meters per bar, for a given flowrate. These constants provide a secondary means for estimating TOB; thatis, DP and flow rate are measured, the constant is obtained from thetable, and the TOB estimate is computed.

The rate of penetration (ROP) of the bit into the formation, usuallyreported in units of feet per hour or meters per hour, depends on themagnitudes of the weight on bit, the bit rotation speed and the flowrate. The torque on bit is also dependent on these parameters.

If the rate at which the drill string is lowered at the surface exceedsthe rate at which the bit can penetrate the formation at itsinstantaneous combination of WOB, ω_(b) and Q, the WOB increases until astate of equilibrium is attained, at which point the bit ROP isidentical to the drill string descent velocity at the surface, which isalso known as block descent velocity (BDV), top drive descent velocity(TDV), or surface ROP (SROP). If, as drilling proceeds, a softerformation is encountered and BDV is less than the rate at which the bitcan penetrate the formation at its instantaneous combination of WOB,ω_(b) and Q, the load on the bit “drills off” as the drill stringextends until the WOB and drill string descent rate are once again inequilibrium. The time required to reach equilibrium, alternatelyreferred to herein as the time required to reach steady state, dependson a number of factors, including well depth, drill string compositionand formation properties.

Drilling performance is often quantitatively assessed in terms of costper foot drilled (CPF) or average ROP over a hole section or a bit run,and is affected by uncontrollable and controllable factors. The formerinclude characteristics of the geological formation, the pore andfracture pressure gradients, subsurface temperature gradients and thevertical depth at which formations are encountered. The latter includefactors specified prior to drilling, such as the type of drilling fluidused and the composition of the drillstring (including type of downholemotor used), and factors that can be manipulated while drillingproceeds, such as pump stroke rate (which, for a given pumpconfiguration, governs flow rate of the drilling fluid into thewellbore), rotary speed of the drill string and BDV. These manipulatedvariables (MV), in turn, affect parameters that can be measured andcontrolled, herein referred to as control variables (CV), such as WOB,TOB, the total torque required at the surface to rotate the drillstring,circulating pressure measured at the surface, downhole motordifferential pressure, et cetera.

The selected values, or magnitudes, of the manipulated and controlleddrilling parameters highly influence the efficiency of the drillingprocess. For example, ROP generally increases substantially linearlywith increased WOB, but there is a limit to this relationship, as thedrilling process becomes inefficient at high values of WOB as a resultof factors such as increased wear of the drill bit, bit balling,insufficient borehole cleaning, and drill string vibration. The lattercan include axial vibration, lateral vibration or torsional vibration.Also, the drilling process may become inefficient at relatively lowvalues of WOB, especially when drilling into hard geological formations.Moreover, the transient effects on WOB, TOB and ROP caused by variationsin formation characteristics and downhole conditions further complicateidentification and maintenance of parameters that optimize the drillingperformance of the drilling assembly.

Historically, manipulation of BDV to maintain a desired value of WOB orsome other control variable has been done manually by the driller. Morerecently, control systems on drilling rigs have been augmented toinclude “automatic drillers” (auto-drillers) that use computer logic tomanipulate BDV such that target values (also known as setpoints) forcertain control variables are maintained.Proportional-integral-derivative (PID) or Heuristic controllers areoften employed for this purpose. Some auto-drillers allow multiplecontrol variables to be considered simultaneously, for example surfaceROP, WOB and motor differential pressure. In this case, the controlleradjusts the BDV until the lowest value that causes a setpoint to bereached is found. The process is known as a “low select.” The ability ofthe controller to hold the desired setpoints depends on its structureand tuning. Proper tuning requires quantification of the dynamicresponse of the system, which changes as drilling conditions change.Procedures for quantification of system response, such as step tests,are well known in the controls industry, but these can be time consumingand are not commonly applied as drilling progresses. As a result, theability of auto-drillers to hold setpoints is suboptimal, and“overshoot” of control variables can cause machine protection limits tobe reached. This interrupts the drilling process and forces the drillerto intervene to correct the situation. The lost time contributes toincreased cost per foot and decreased average ROP.

The setpoints themselves are selected by the driller based onexperience, theory, or analysis of drilling data from other wells thathave been drilled in the vicinity. Methods for identifying combinationsof drilling parameters that, if used, will minimize a given objectivefunction (e.g. cost per foot) have been described in the literature, butthese require analysis of historical data in an area, constructingempirical models that provide a “best fit” of the data, and using themto find preferred parameter combinations. These approaches are limitedin that they (1) are time consuming, (2) require availability of offsetdata to calibrate models, (3) are only applicable over ranges ofdrilling parameters used in offset wells, (4) are heavily dependent onbit attributes that are difficult to ascertain and can vary widely fromone design to another, and (5) are only marginally applicable to wellswhere different formations and/or different well trajectories are used.In view thereof, drilling operations typically do not operate at optimumconditions but rather at constant values of weight on bit, rotary speed,and flow rate of drilling fluid, which values are expected to work well.

More recently, routines for closed loop control have been described,including the use of either minimum mechanical specific energy (MSE) ormaximum ROP as the objective and manipulation of drilling parameters toconstruct response surfaces for ROP vs. WOB and rotation speed (RPM) soas to identify local maxima. These approaches are limited in usefulnessbecause they are either (1) highly sensitive to noise in drilling data,and thus require considerable computational overhead; (2) ineffectivebecause they require excessive time to implement, during which drillingis conducted using sub-optimal combinations of parameters; (3)incomplete because they do not effectively address constraints thatshould limit parameter selection, e.g. indications of dynamicdysfunction.

Hence, there is a need for a system and method for control andoptimization of drilling parameters that avoids the shortcomings ofexisting systems.

SUMMARY OF THE INVENTION

The objective of the invention is to provide an improved system andmethod for optimizing drilling performance of a drilling assembly fordrilling a borehole in an earth formation. The system comprises (1) aself-tuning, multivariable controller that enables improved,simultaneous maintenance of desired setpoints for a number of drillingvariables, and (2) an optimization engine that manipulates the setpointsof the controller such that drilling performance is continuouslyoptimized. The multivariable controller (1) evaluates a characteristicsystem time constant, (2) uses this time constant to compute bit ROP,(3) uses computed bit ROP to compute process gains which, in turn, areused to tune the multivariable controller, (4) automatically refinescontroller setpoints based on controller performance.

The optimization engine systematically adjusts controller setpoints suchthat drilling parameters are optimized based on any of severalperformance indicators, or a weighted combination of performanceindicators. The optimization method uses the following performanceindicators, all of which are computed using estimated bit ROP: (1) a bitwear parameter; (2) the gradient of cost per foot; (3) the gradient ofbit ROP versus WOB; (4) simplified mechanical specific energy; and (5)hydraulic specific energy.

The method further comprises using two-step, three-step, or drill-offscanning procedures to evaluate the objective functions. The methodfurther comprises using estimated steady-state values of objectivefunctions to accelerate the scanning process. The method furthercomprises using weighting functions to combine results from individualobjective functions. The method further comprises computing weightingfunctions using statistical measures. The method further comprises usinga steady state detection algorithm to determine whether or not to beginor terminate scanning procedures. The method further comprises settingthe BDV setpoint such that some other CV considered in the low selectalgorithm governs drawworks control when drilling conditions are notsteady.

As described in detail below, according to the invention, optimizationis achieved by perturbing manipulated variables and assessing howcontrolled variables and objective functions change in response to thoseperturbations. The changes either verify that operation is optimal orpoint to combinations of operating parameters will yield improvedperformance. Some embodiments systematically vary a single MV toquantify effects on CV and objective functions, while other embodimentssimultaneously vary multiple MV, for example BDV and bit speed, suchthat the product of TOB and bit rotation speed is held constant.Manipulated variables employed within the invention include blockdescent velocity, surface rotation speed and flow rate. Parameters arecontrolled such that limiting values of BDV, hook load, WOB, TOB, totalrotating torque, downhole motor differential pressure, total circulatingpressure, surface rotation speed, bit speed, measured surface vibrationseverity and measured downhole vibration severity are not exceeded. Thepresent methods do not require offset data to be available, and are thusapplicable in exploration drilling. Still further, the present methodsare computationally efficient and use commonly available drillingmeasurements such as block descent velocity, hook load, surface torque,surface rotation speed, pump stroke rate, flow rate and surfacepressure.

DETAILED DESCRIPTION OF THE DRAWINGS

The invention will be described hereinafter in more detail and by way ofexample, with reference to the accompanying drawings in which:

FIG. 1 is a schematic diagram showing the two levels of control providedby an embodiment of the system;

FIG. 2 is a schematic of the “low select” algorithm for control of blockdescent velocity;

FIG. 3 is a schematic of a proportional-integral-derivative (PID)controller;

FIG. 4 is a schematic showing a process variable versus time for threevalues of proportional gain K_(P) with integral and derivative gainsK_(I) and K_(D) held constant;

FIG. 5 is a schematic showing a process variable versus time for threevalues of integral gain K_(I) with proportional and derivative gainsK_(P) and K_(D) held constant;

FIG. 6 is a schematic showing a process variable versus time for threevalues of derivative gain K_(D) with proportional and integral gainsK_(P) and K_(I) held constant;

FIG. 7 is a schematic showing optimum WOB and ROP based on the ROP:WOBrelationship;

FIG. 8 is schematic showing optimum ROP based on the SMSE:ROPrelationship;

FIG. 9 is schematic showing a first order model of the drilling system;

FIG. 10 is schematic showing the controller parameter computationprocedure;

FIG. 11 is schematic showing optimum WOB and ROP based on the ROP/WOBratio;

FIG. 12 is schematic showing optimum WOB and ROP based on deviation froma linear model of ROP and WOB;

FIG. 13 is schematic showing evolution of cumulative cost per foot overa bit run;

FIG. 14 is schematic showing the optimization procedure used in anembodiment of the invention;

FIG. 15 is a schematic showing the two-step method of optimization basedon response of bit ROP to changes in manipulated variables;

FIG. 16 is a schematic showing the two-step method of optimization basedon generalized responses of objective functions to changes inmanipulated variables;

FIG. 17 is a schematic showing the three-step method of optimizationbased on response of bit ROP to changes in manipulated variables;

FIG. 18 is a schematic showing decay of measured WOB over time when BDVis set to zero while executing scanning via the drill-off method;

FIG. 19 is schematic showing transient drilling system behavior after aBDV setpoint change;

FIG. 20 is a schematic showing Example of possible simultaneousvariations of TOB and bit rotation speed (ω_(b));

FIG. 21 is a schematic showing examples of simultaneous variations ofTOB and bit rotation speed (ω_(b)) for constant mechanical power;

FIG. 22 is a schematic showing examples of simultaneous variations ofTOB and bit rotation speed (ω_(b)) for increments or decrements ofmechanical power.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The System: Self-Tuning Multivariable Controller

FIG. 1 presents a structural view of the drilling control andoptimization system. The control layer comprises a self-tuning,multivariable controller that enables improved, simultaneous maintenanceof desired setpoints for a number of drilling variables. FIG. 2 providesexamples of variables that can be used as the basis for control. In apreferred embodiment, the controllers for each of these variables are ofthe proportional-integral-derivative (PID) type, a block diagram ofwhich is provided in FIG. 3. The standard form of the governing equationfor a PID controller is provided below.

$\begin{matrix}{z = {{K_{C}e} + {\frac{K_{C}}{T_{I}}{\int_{0}^{t}{{ed}\;\tau}}} + {K_{C}T_{D}\overset{.}{e}}}} & (1)\end{matrix}$

In the above equation z is the controller output, e is the error(defined as the setpoint minus the process variable value at the currenttime), K_(C) is the controller gain, alternately known as theproportional gain, and T_(I) and T_(D) are time constants for integraland derivative terms, respectively. The integral time constant isalternately referred to herein as the reset time. An alternate form ofthe PID equation, known in the art as the ideal form, is used in somecases, wherein

$\frac{K_{C}}{T_{I}}$is referred to as the integral gain (K_(I)) and K_(C)T_(D) as thederivative gain (K_(D)).

The performance of such controllers is typically described in terms ofstability, rise time, settling time and overshoot. Rise time is the timerequired to reach a desired setpoint when it is changed. Settling timeis the time required for a process variable to enter and remain within aspecified error band after a change in setpoint. Overshoot is themaximum value the process variable reaches during the settling time. Theeffects of the gain terms on rise time, settling time and overshoot areshown in FIGS. 4, 5, and 6.

Designing and tuning a PID controller can be difficult if short rise andsettling times and high stability are required. Some processes have adegree of non-linearity, so parameters that work well at full-loadconditions do not work when the process is starting up from no-load. PIDcontroller performance can generally be improved by careful tuning, andperformance may be unacceptable with poor tuning. The present inventionensures optimal controller performance by continually tuning thecontroller based on instantaneous drilling conditions.

The System: Optimization Engine

The optimization layer comprises a computation engine that manipulatesthe setpoints of the control layer such that drilling performance iscontinuously optimized. As is known in the art, optimization isgenerally achieved by minimizing or maximizing a given objectivefunction. FIG. 7 provides an example of how this can be achieved usingrate of penetration (ROP) as the objective function. The diagrampresents a curve representing ROP as a function of weight on bit (WOB)for a drill bit within a drilling assembly (not shown) used in anexemplary embodiment of the system and method of the invention. Whendrilling with values of WOB in the range labelled A, the rate ofpenetration increases more than linearly with weight on bit. Expresseddifferently, the gradient (or slope of the curve) increases withincreasing weight on bit. When values in the range labelled B are used,the ROP increases substantially linearly with WOB; that is, the gradientis substantially constant in the range labelled B. When values of WOB inthe range labelled C are used, the ROP increases less than linearly withweight on bit, or expressed differently, the gradient of the curvedecreases with increasing weight on bit. The transition point on thecurve, which represents the gradient decreasing below its maximum valueby an amount denoted “threshold”, is referred to as the “flounderpoint.” This point can be considered an optimal WOB for incrementalreturn of ROP.

Other parameters, for example the mechanical specific energy (MSE), canalso be used as objective functions. MSE represents the amount ofmechanical energy consumed to remove a unit volume of rock during rotarydrilling operations. It is often computed using the equation from Tealeshown below.

$\begin{matrix}{{MSE} = {\frac{WOB}{A_{b}} + \frac{120\pi\; T\;\omega}{A_{b}{ROP}}}} & (2)\end{matrix}$where WOB is the weight on bit defined previously, A_(b) is the area ofthe bit, T may be either the torque applied at the surface or the torqueon bit (TOB), ω may be either the bit rotary speed or the surface rotaryspeed, and ROP is rate of penetration. In practice, the first term onthe right hand side is much smaller than the second, so a simplifiedexpression (SMSE) can be used, and is preferable:

$\begin{matrix}{{SMSE} \equiv \frac{120\pi\; T\;\omega}{A_{b}{ROP}}} & (3)\end{matrix}$SMSE has the units of energy per unit volume, which reduce to units ofstress. Laboratory and field studies have shown that in a given rock,the minimum achievable value of specific energy is related to the rockstrength.

FIG. 8 presents a graph of SMSE as a function of ROP that isestablished, for example, by manipulating ROP, measuring steady statevalues of WOB, torque and rotary speed, and computing SMSE. The ROP atwhich SMSE reaches its minimum may be selected as optimal based onenergy input for incremental ROP gain.

In a preferred embodiment of the present invention, these and otherobjective functions are considered, their inputs are weighted andcombined, and the result is used to determine if the manipulatedvariable should be increased, decreased or held constant.

The Method: Self-Tuning Multivariable Controller

A preferred embodiment of the invention involves representing the axialmotion of the drilling system using a spring-damper model as shown inFIG. 9. The first order differential equation that describes bitvelocity using this model is shown in Eq. 4.

$\begin{matrix}{{{\frac{c}{k}\frac{{dv}_{Bit}}{dt}} + v_{Bit}} = v_{Block}} & (4)\end{matrix}$

The bit velocity (v_(Bit)) is equivalent to the rate of penetration(ROP), and block velocity (v_(Block)) is referred to elsewhere in thisdocument as BDV. The invention quantifies the damping coefficient c andstiffness coefficient k as follows:

$\begin{matrix}{c = {{damping} = \frac{WOB}{ROP}}} & (5) \\{k = {{stiffness} = \frac{EA}{L}}} & (6)\end{matrix}$

The invention quantifies the characteristic time constant for the axialmotion of the drilling system using the ratio of damping to stiffness:

$\begin{matrix}{\tau = {{{time}\mspace{14mu}{constant}} = {\frac{WOB}{ROP}\frac{L}{EA}}}} & (7)\end{matrix}$

In the above equations, L is the total length of the drill pipe in thedrillstring, E is the modulus of elasticity of the material from whichthe drill pipe is made, and A is the cross sectional area of the drillpipe. The above equations assume a single size of drill pipe is used,but this not always the case in practice. When multiple drill pipe sizesare used, an equivalent axial stiffness for the assemblage may becomputed from known equations for springs in series.

The solution of Eq. 4 allows the bit ROP at any given time t to beestimated from the measured BDV. One useful form of this solution is

$\begin{matrix}{{{ROP}(t)} = {{f({BVD})} = {{{{BDV}(t)}\left( {1 - e^{- \frac{\Delta\; t}{\tau}}} \right)} + {{{ROP}\left( {t - {\Delta\; t}} \right)}\left( e^{- \frac{\Delta\; t}{\tau}} \right)}}}} & (8)\end{matrix}$

In this expression BDV(t) is the block descent velocity at the currenttime (t), Δt is the elapsed time between the previous and currentmeasurements of drilling variables, and ROP(t−Δt) is the previousestimate of bit ROP. Per the equation, the current estimate of bit ROPis obtained by applying a first order filter to the measured blockdescent velocity f(BDV), where the time constant of the filter isobtained from system properties and recent drilling data as per Eq. 7.

In preferred embodiments, the time constant r is continuously calculatedand is limited by a user-specified minimum value and a maximum valueexpressed as a factor of drill string length, or, equivalently, bitdepth.

The process gain K_(P) for each control variable (CV) of interest, forexample WOB, differential pressure, circulating pressure, differentialtorque, or total torque, is defined as the change in that variable for agiven change in BDV. Preferred embodiments of the invention computethese process gains as

$\begin{matrix}{K_{P} = \frac{CV}{f({BDV})}} & (9)\end{matrix}$

Preferred embodiments filter the measured control variable using, forexample, a low pass filter, before computing the process gain. Note thisvalue of K_(P) is bulk, or overall, gain in the CV per TDV. The actualprocess gain of most interest to the controller will be the differentialgain at the setpoint value. This differential gain is likely to besomewhat higher than the bulk gain, because the slope tends to be lowerat small values of TDV, and increases near the bit floundering point.However, bulk gain is much more easily calculated than differential gainand tends to correlate well with differential gain. Some embodiments ofthe present invention use a closed-loop time constant in the controllerequations that is based on the characteristic time constant computed asabove but is adjusted to compensate for an underestimate of processgain.

As with τ, K_(P) is preferably continuously calculated. Since values ofWOB and ROP are required for the computations, the values can only beupdated while drilling is in progress with the bit on bottom. Otherwise,previously-calculated time constants and bulk gains are used.

Preferred embodiments of the invention use the time constant τ andprocess gains K_(P) to compute the proportional gain constant K_(C), thereset time T_(I) and the derivative time T_(D) for the PID controllersfor each control variable of interest. Some embodiments may set one ormore of these constants to zero for a controller or controllers.

The preferred computation procedure is shown in block form in FIG. 10.The measured BDV is preferably filtered using, for example, a low passfilter. The first order filtered value of BDV, represented as f(BDV), isthen computed using, for example, Eq. 8. The most recently computedvalue of system time constant τ is used for this computation. Themeasured value of WOB is preferably filtered using, for example, a lowpass filter, and the bulk process gain for WOB is then computed usingEq. 9. This result is used to compute an updated estimate of the systemtime constant using Eq. 7, and is also passed to the PID tuningalgorithm, preferably after being filtered using, for example, a lowpass filter. The updated system time constant τ is compared topredefined minimum and maximum values and, if greater or less thanspecified maximum or minimum values, is set to the minimum or maximumvalue, as appropriate. The time constant is used to compute the cutofffrequency for low pass filters that are preferably used to filter themanipulated variable BDV and control variables. The updated, andadjusted if necessary, time constant is also passed to the tuningalgorithm, preferably after being filtered using, for example, a lowpass filter.

Bulk process gains for other control variables of interest, for exampledifferential pressure, total circulating pressure, differential torque,total rotating torque, are then computed using Eq. 9. The gains are thenpassed to the PID tuning algorithm, preferably after being filteredusing, for example, a low pass filter.

A number of approaches for selecting PID controller constants K_(C),T_(I) and T_(D) are known in the art, including manual methods, theZiegler-Nichols method, and the Cohen-Coon method. Commercial softwareis also available for PID tuning. The present invention uses an approachbased on the internal model control (IMC) tuning algorithm. It uses theprocess gain and time constant calculations described previously, andallows for manual and automatic adjustment of the controller's speed ofresponse. The controller constants are preferably obtained from thefollowing expressions:

$\begin{matrix}{K_{C} = {\frac{1}{K_{P}}\frac{\left( {{C_{1}\tau} + C_{2}} \right)}{\left( {{C_{3}\tau_{c}} + C_{4}} \right)}}} & (10) \\{T_{I} = {{C_{5}\tau} + C_{6}}} & (11) \\{T_{D} = {{C_{7}\tau} + C_{8}}} & (12)\end{matrix}$

The closed loop time constant for the controller τ_(c) and constantsC_(i), i=1,8 in the above equations may be specified by the operator.Alternately, the parameters may be computed as functions of processgains and the system time constant.

The tuning calculations are preferably performed continuously, but someembodiments apply them to the controllers intermittently. The timebetween updates may be, for example, a user-specified multiple of thelatest computed system time constant τ. Alternately, or in combination,updates may be applied only if PID controller constants K_(C), T_(I) orT_(D) differ from previously computed values by a specified minimum, orby a specified minimum rate per minute. Some embodiments of theinvention may limit updates of K_(C), T_(I) or T_(D) based on specifiedmaximum amounts of change, based for example on percent difference fromprevious values, or based on rate of change compared to previous values.Preferred embodiments also allow the auto-tuning function to be enabledor disabled by a user.

When drilling is proceeding in a manner that indicates the absence ofdysfunction, it is often desirable to have the setpoints for the controlvariables of interest as close to the limiting values as practicable. Ifthe setpoints are too near the limits, changes in drilling conditionscan cause the limits to be encountered, which may in turn cause aninterruption to the drilling process—and incremental drilling expensedue to lost time—while the driller intervenes. The present invention,therefore, includes a method for continuously assessing the performanceof active controllers and adjusting the proximity of setpoints tolimits.

Preferred embodiments quantify controller performance constantly bycomputing the variation V of each CV within a moving window, defined asthe maximum value of the CV minus the minimum value of the CV, andcomparing with the setpoint value SP and limit value, also referred toherein as the interlock value I. The length of the moving window ispreferably a user-specified multiple of the time constant τ. Duringnormal operation, the setpoint optimization function computes a new CVsetpoint SP(t) as follows:

$\begin{matrix}{{{Target}\mspace{14mu}{Set}\mspace{14mu}{Point}} = {{TSP} = {{\frac{K_{1}}{100}I} - {K_{2}\frac{V}{2}}}}} & (13) \\{{{SP}(t)} = {{{SP}\left( {t - {DT}} \right)} + {\left\lbrack {{TSP} - {{SP}\left( {t - {DT}} \right)}} \right\rbrack K_{3}\frac{DT}{100}}}} & (14)\end{matrix}$

In the equations above DT is the algorithm execution time, K₁ is auser-specified maximum percentage of the interlock value I that thesetpoint can reach, K₂ is a user-specified parameter that representssteady-state variation of the CV, and K₃ is a user-specified parameterrepresenting the rate at which the target SP is approached per second.The maximum value of

$K_{3}\frac{DT}{100}$is limited to 1.0.

If and when a limit value is reached and a process interlock occurs, thedrilling parameter setpoint is reset so that it does not exceed aseparately specified maximum fraction of the interlock value K₄:

$\begin{matrix}{{{SP}(t)} = {{minimum}\left\lbrack {{{SP}(t)},{\frac{K_{4}}{100}I}} \right\rbrack}} & (15)\end{matrix}$

The algorithm is preferably executed such that DT is equal to the movingwindow length. It is preferably executed for a given controller wheneverthe controller is enabled and the bit is on the bottom drilling,regardless of whether the particular controller's output is selected bythe low-select function. As the system time constant τ increases, themoving window length increases correspondingly and thus adjustments aremade less frequently.

Preferred embodiments allow the setpoint optimization function to beenabled or disabled by the user.

The Method: Optimization Engine

One embodiment of the present invention comprises an optimization enginethat computes setpoints for use in the controller layer such thatdrilling parameters are optimized based on any of several performanceindicators, or a weighted combination of performance indicators. Theoptimization engine may be used in “automatic” or “auto” mode, in whichsaid setpoints are passed directly to the controller layer which, inturn, actuates rig equipment. The optimization engine may also be usedin “manual” mode, in which setpoints are presented to an operator forreview, acceptance and, if desired, modification before being passed tothe control layer. The optimization engine may also be used in “monitor”mode, in which computations are performed and results presented to theoperator and archived for later examination, but setpoints are notpassed to the control layer.

A first performance indicator used in preferred embodiments is derivedfrom the relationship between bit ROP and WOB represented graphically inFIG. 7, where bit ROP is computed from BDV using, for example, Eq. 8.The flounder point shown in the figure can be considered optimal interms of incremental ROP for a given increase in WOB.

Embodiments may identify the flounder point in any of a number of ways.If desired, multiple approaches may be used, and the maximum, minimum oraverage of the values identified may be taken as the optimal combinationof bit ROP and WOB.

One approach, described already and shown in FIG. 7, involves repeatedlycomputing the gradient of the bit ROP versus WOB curve usingmeasurements from different BDV setpoints and identifying the BDV andWOB beyond which the gradient decreases, or decreases by more than athreshold value. The threshold may be expressed in relative terms, forexample as a percentage of the gradient value, or in absolute terms, forexample a given quantity of distance per unit time per unit force.

A second approach, closely related to the first, is to consider thechange of gradient values a second order gradient; that is, the secondderivative of the curve representing the bit ROP-WOB relationship. Inregion A of FIG. 7, and the lower portion of region B, the second ordergradient is positive. As bit ROP increases, the second order gradientapproaches zero and, eventually, becomes negative. The ROP:WOB pair atwhich the second order gradient becomes negative, or falls below zero bymore than a threshold amount, may be taken as the flounder point.

A third approach for identifying the flounder point is depicted in FIG.11, in which successive values of the ratio of bit ROP to WOB are shownby noting that such ratios represent the slopes of lines through bitROP:WOB pairs and the origin. Combinations of bit ROP and WOB in regionsA and B in the figure are characterized by gradually increasing ratios;that is, as bit ROP increases, the ROP:WOB ratio also increases.Combinations of bit ROP and WOB in region C, however, reverse thattrend. The flounder point may thus be identified as the point at whichthe bit ROP:WOB ratio decreases below the maximum by more than athreshold value, where the threshold is defined as above. It may benoted that the bit ROP:WOB ratio is the inverse of the bulk WOB gainused in the controller layer of one embodiment of this invention.

A fourth approach for identifying the flounder point is shown in FIG.12, which depicts a linear approximation of the bit ROP-WOB responseconstructed from two bit ROP:WOB pairs. If bit ROP:WOB pairscorresponding to BDV setpoints equal to or greater than point 2 in thefigure deviate from this line by more than a threshold amount, thepoints can be identified as residing in region C. The highest ROP:WOBpair that remains within the threshold distance from the line may betaken as the flounder point.

A second performance indicator that may be employed in preferredembodiments of the present invention comprises a bit wear parameter(WP), which represents the volumetric wear of a cutter on the peripheryof a bit per distance drilled along the well path. The expression for WPis derived from a basic assumption used in wear models known in thedrill bit industry: a cutter will experience volume loss proportional tothe load it carries and the distance it slides. The constant ofproportionality represents the “abrasiveness” of the rock being drilled.Suitably derived, the cutter wear per distance drilled then becomes:

$\begin{matrix}{{WP} = \frac{\beta\;{WOB}\;\omega_{b}}{ROP}} & (16)\end{matrix}$

WOB, ω_(b) and ROP are as defined previously. WP is preferably computedcontinuously using bit ROP, which in turn is computed from BDV using Eq.8. The constant β, which accounts for formation abrasiveness and bitgeometry considerations, may be set to one for the purposes of parameteroptimization in a given formation. Combinations of drilling parametersthat minimize WP are optimal from the standpoint of ensuring bits remainas sharp and efficient as possible for as long as possible.

A third performance indicator that may be used within the optimizationengine is based on the gradient of cumulative cost per foot (CPF). CPFis computed using an equation well known in the drilling industry:

$\begin{matrix}{\frac{Cost}{Foot} = \frac{{{Bit}\mspace{14mu}{Cost}} + {{Rig}\mspace{14mu}{{Rate}\left( {{{Drilling}\mspace{14mu}{Time}} + {{Trip}\mspace{14mu}{Time}}} \right)}}}{{Footage}\mspace{14mu}{Drilled}}} & (17)\end{matrix}$

The “bit cost” may be fixed, or may itself depend on footage drilled.The “rig rate” is the cost per unit time of the drilling equipmentemployed during the bit run. The “drilling time” is the cumulative timeelapsed during the current bit run, which, for a given amount of footagedrilled, is inversely related to average ROP. The “trip time” is the sumof the time required to trip the bit into the hole to commence drillingand to trip it back out when the hole section is complete or a differentbit is required. Trip time in and out may be estimated by summing thecorresponding hole depths and dividing by an average tripping rate, forexample 1,000 ft per hour. The “footage drilled” is the cumulativefootage drilled by the bit in the hole during its present run. Theequation above can be used to compute the cumulative cost per footduring a bit run, an example of which is provided in FIG. 13. Thecumulative cost per foot is initially infinite because the distancedrilled is zero; as footage accumulates, the cost decreases. Thegradient of the cumulative cost per foot, expressed per unit distancedrilled or per unit time, can be maximized to drive the cost down to itsminimum value. Combinations of parameters that maximize the gradient ofcumulative cost per foot are thus desirable for minimizing drillingcost.

A fourth performance indicator that may be employed within theoptimization engine is given by the simplified mechanical specificenergy (SMSE) defined in Eq. 3. SMSE is preferably computed continuouslyusing bit ROP obtained from Eq. 8, bit rotation speed and bit torque.The latter may be taken as differential torque or computed fromdifferential pressure, as described previously. If both values areavailable, some combination of the two, for example, a weighted average,may be used. Combinations of parameters that minimize SMSE as shown inFIG. 8 are desirable because they minimize the energy expended to removea unit volume of rock. Energy expended directly affects power and fuelconsumption, and also affects wear of drilling equipment and thus runlength, rate of penetration and maintenance and/or replacement costs.

A fifth performance indicator that may be employed within theoptimization engine is given by a parameter referred to herein ashydraulic specific energy (HSE), which is defined as the hydraulicenergy consumed at the bit while removing a unit volume of rock. HSE isobtained as the hydraulic horsepower supplied to the bit, a parameterwell known in the drilling industry and itself obtained from the productof pressure drop across the bit and volumetric flow rate through thebit, divided by the rate of penetration. Mathematically HSE is definedas:

$\begin{matrix}{{HSE} = {K_{5}\frac{\rho_{m}Q^{3}}{A_{b}A_{n}^{2}{ROP}}}} & (18)\end{matrix}$

The flow rate (Q), rate of penetration (ROP) and bit area (A_(b)) are asdefined previously. Drilling fluid density (ρ_(m)) is typicallyexpressed in pounds mass per gallon or kilograms per cubic meter. Totalnozzle area (A_(n)), also referred to in the industry as total flow area(TFA), is the sum of the cross section areas of the nozzles and/or flowpassages through the bit, and is typically expressed in square inches orsquare centimeters. Like other specific energy expressions, HSE hasunits of stress (force per unit area). The constant K₅ in the equationabove depends on the unit system employed. The hydraulic horsepowerconsumed while drilling is directly proportional to power and fuelconsumption and wear of internal pump components, which in turn leads tonon-productive rig time for maintenance and replacement part cost.Combinations of drilling parameters that minimize HSE are thus optimalfrom the standpoint of drilling cost reduction.

Scanning Procedures

Preferred embodiments of the invention employ scanning procedures withinthe optimization engine to quantify the objective functions and, in somecases, their gradients with respect to distance drilled or time. Thescanning procedures are used within the execution scheme of theoptimization engine as shown in FIG. 14.

In step 40 drilling proceeds in a mode governed by the self-tuningmultivariable controller using setpoints initially defined by theoperator, but refined via logic as described previously. Reference sign50 represents data on geometrical information, such as bottom holeassembly (BHA) composition, casings, drill pipe, and surface equipmentthat are used in computations in the controller layer. Reference sign 51represents real time measurements of drilling parameters obtained fromsensors at the surface and, if available, downhole. These real time dataare also used within the controller layer.

In step 41 the optimization engine is engaged and scanning andcomputation procedures to be followed within the engine are definedbased on configuration data represented by reference sign 52.Geometrical information and real time drilling data represented byreference signs 50 and 51, respectively, are also passed to theoptimization engine.

In step 42 the current drilling situation and scanning step areassessed. Factors considered include which control variable is governingblock descent velocity, whether drilling parameters are changing or aresteady, whether the current setpoints have been selected as part of ascanning procedure, and whether an adjustment in setpoints is requiredto continue or complete the current scanning procedure.

A first scanning procedure, herein referred to as the two-step method,used within the invention evaluates the objective functions of interestat two distinct MV setpoints and renders a decision regarding the nextsetpoint based on the gradient of the response. FIG. 15, which is ageneralization of FIG. 7, provides an example in terms of therelationships between bit rate of penetration and manipulated variablessuch as surface (or bit) rotation speed and flow rate. If a firstsetpoint is that represented by point 1 in the figure, and a second isthat represented by point 2, then a positive change in MV yields anincrease in bit ROP. This is a favorable response, and indicates that asubsequent positive change to the MV may lead to still higher values ofbit ROP. On the other hand, if a first setpoint is that represented bypoint 3 in the figure, and a second is that represented by point 4, thenan increase in the MV yields a decrease in bit ROP, which indicates thatthe optimal setpoint value is somewhat lower than the current value. Thecondition for favorable bit ROP responses to MV setpoint changes may bewritten as follows:

$\begin{matrix}{\frac{\partial\left( {{bit}\;{ROP}} \right)}{\partial{MV}} > 0} & (19)\end{matrix}$

The symbol ∂ in the above equation represents the partial derivative;that is, the change in bit ROP resulting from a change in the MV ofinterest while holding all other process variables constant. This ratiois also referred to herein as the first order gradient of bit ROP withrespect to the MV of interest.

FIG. 16, a generalization of FIG. 8, provides an example of two-stepscanning using relationships between objective functions that should beminimized and the manipulated variables described herein. If a firstsetpoint is that represented by point 1 in the figure, and a second isthat represented by point 2, then a positive change in MV yields areduction of the objective function. This is a favorable response, andindicates that a subsequent positive change to the MV may lead tofurther reduction of the objective function. On the other hand, if afirst setpoint is that represented by point 3 in the figure, and asecond is that represented by point 4, then an increase in the MV yieldsan increase in the objective function, which indicates that the optimalsetpoint value is somewhat lower than the current value. The conditionfor favorable responses of these objective functions to MV setpointchanges may be written as follows:

$\begin{matrix}{\frac{\partial\left( {{Objective}\mspace{14mu}{Function}} \right)}{\partial{MV}} \leq 0} & (20)\end{matrix}$

The criterion represented by this equation may be stated as the firstorder gradient of the objective function with respect to the MV ofinterest is equal to or less than zero.

A second scanning method, herein referred to as the three-step method,that may be used within the invention evaluates the objective functionsof interest at three distinct MV setpoints and renders a decisionregarding the next setpoint based on the first order gradients, asdescribed above, and also the second order gradients of the responses,where the second order gradients represent the rates of change of thefirst order gradients with respect to the same MV. FIG. 17 provides anexample in terms of the relationships between bit ROP and MV. If a firstsetpoint is that represented by point 1 in the figure, a second is thatrepresented by point 2, and a third is that represented by point 3, thentwo first order gradients may be computed using points 1 and 2 andpoints 2 and 3, respectively. If the numerical value of the secondgradient is greater than that of the first gradient, then a positivechange in MV between points 2 and 3 yields a larger increase in bit ROPthan a positive change between points 1 and 2. This is a favorableresponse, and indicates that a subsequent positive change to the MV maylead to still higher values of bit ROP. On the other hand, if a firstsetpoint is that represented by point 2 in the figure, a second is thatrepresented by point 3, and a third is that represented by point 4, thenthe numerical value of the gradient between points 3 and 4 is less thanthat of the gradient between points 2 and 3. This indicates that anincrease in the MV between points 3 and 4 yields a smaller increase inbit ROP than a similar increase in MV between points 2 and 3, which inturn indicates that the optimal setpoint value is somewhat lower thanthat corresponding to point 4. The condition for favorable bit ROPresponses to MV setpoint changes in terms of second order gradients maythen be written as follows:

$\begin{matrix}{\frac{\partial^{2}\left( {{bit}\mspace{14mu}{ROP}} \right)}{\partial M^{2}} > 0} & (21)\end{matrix}$

A third scanning method, herein referred to as the drill-off method,that may be employed within the invention takes advantage of thedrill-off phenomenon described previously. As drilling proceeds using agiven combination of MV, the block descent is temporarily halted whilethe other MV are held constant. The bit drills ahead as the drillstringelongates, with WOB gradually decreasing as shown in FIG. 18. The bitROP can be estimated from the change in WOB over time by applyingHooke's law using an equation that is well known in the industry:

$\begin{matrix}{{{- 0.95}\frac{L}{EA}\frac{\Delta\;{WOB}}{\Delta\; t}} = {{bit}\mspace{14mu}{ROP}}} & (22)\end{matrix}$

In the equation above L represents the length of the drill pipe, A isits cross section area and E is the modulus of elasticity of the pipetube material. The term L/EA represents the axial compliance of thedrillstring assuming that only the stretch of the drillpipe issignificant. The constant 0.95 compensates for the length of thedrillstring that is occupied by tool joints, which are much stifferaxially than the drill pipe tube bodies.

The invention computes bit ROP using the equation above while capturingother parameters required to compute the objective functions ofinterest. The criteria used in the two-step and three-step approachesare then employed to identify MV setpoints.

If drilling conditions change after a scanning procedure has beencompleted, for example, due to rock formation changes, then the scanningprocedure is repeated to ensure that setpoints are optimal for the newformation. If drilling conditions change while a scanning procedure isbeing executed, the validity of results from computed objectivefunctions will be compromised and the scanning cycle is terminated untildrilling conditions become steady. Preferred embodiments recognize suchchanges in drilling conditions by continuously computing and evaluatingthe averages and standard deviations of selected parameters, for examplethe bulk control variable gains K_(B) described previously, over aspecified sampling window that is preferably a multiple of the systemtime constant τ. Another parameter used for identifying changes indrilling conditions is the aggressiveness (μ), alternately known in theindustry as the bit-specific friction coefficient, which relates torqueand weight on bit and is defined mathematically as:

$\begin{matrix}{{Aggressiveness} = {\mu = \frac{3\; T}{D_{b}{WOB}}}} & (23)\end{matrix}$

Aggressiveness is unitless, so any consistent set of units may beemployed in the above equation. Weight on bit (WOB) as is definedpreviously, and D_(b) is the bit diameter. The torque Tin the equationis preferably torque on bit, but may also be surface torque.

According to a preferred method, each new value of a selected parameteror parameters is compared with the already existing group(s) of values.If the new value differs from the average by more than S times thestandard deviation, the new value is marked as an “outlier” and excludedfrom the analysis. However, if P percent of similar new values aremeasured in the sampling window, a change of drilling conditions isindicated. Sampling window size, S and P are preferably configurable.

Step 43 evaluates scanning status and objective function values andapplies control logic to determine if a change to setpoints is required,and if so, what the change should be. If scanning is in process,setpoints are selected such that they yield statistically significantdifferences in objective functions while honoring limits on processvariables. If scanning is complete, the decision is based on a weightedcombination of inputs from M objective functions. The inputs comprisediagnoses of favorability based on the criteria in Eq. 19-21. Preferredembodiments allow weighting factors W_(l) to be selected by theoperator, computed, for example based on statistical measures, or somecombination of the two, where the sum of the M weighting factors isunity. The overall probability of a favorable drilling conditionP_(favor) is then obtained as

$\begin{matrix}{P_{favor} = {\sum\limits_{l = 1}^{M}\;{P_{l}W_{l}}}} & (24)\end{matrix}$

The probability of favorability for an individual objective functionP_(l) in the above equation is quantified by making the assumption thatthe distribution of its values during a scanning step is Gaussian.Consider, for example, simplified mechanical specific energy (SMSE) asthe objective function, BDV as the MV, Eq. 20 as the criterion forfavorability and two-step scanning. The mean of the difference in SMSEbetween MV set points ΔSMSE is computed as

$\begin{matrix}{{\Delta\;\overset{\_}{SMSE}} = {\frac{1}{N}{\sum\limits_{j = 1}^{N}\;\left\lbrack {{{SMSE}_{j}\left( {BDVSP}_{k} \right)} - {{SMSE}_{j}\left( {BDVSP}_{k - 1} \right)}} \right\rbrack}}} & (25)\end{matrix}$

The standard deviation of the difference in SMSE between MV setpoints iscomputed as

$\begin{matrix}{\sigma_{{SMSE}{({BDVSP}_{k})}} = \sqrt{\frac{1}{N}{\sum\limits_{j = 1}^{N}\;\left\lbrack {{{SMSE}_{j}\left( {BDVSP}_{k} \right)} - {\overset{\_}{SMSE}\left( {BDVSP}_{k} \right)}} \right\rbrack^{2}}}} & (26) \\{\mspace{79mu}{\sigma_{\Delta\;{SMSE}} = \sqrt{\sigma_{{SMSE}{({BDVSP}_{k})}}^{2} + \sigma_{{SMSE}{({BDVSP}_{k - 1})}}^{2}}}} & (27)\end{matrix}$

The probability that Eq. 20 is satisfied is then obtained using thewell-known error function erf:

$\begin{matrix}{P_{{\Delta\;{SMSE}} \leq 0} = {\frac{1}{2}\left\lbrack {1 + {{erf}\left( \frac{\left( {0 - {\Delta\;\overset{\_}{SMSE}}} \right)}{\sigma_{\Delta\;{SMSE}}\sqrt{2}} \right)}} \right\rbrack}} & (28) \\{{{erf}(x)} = {\frac{2}{\pi}{\int_{0}^{x}{e^{- t^{2}}{dt}}}}} & (29)\end{matrix}$

When the weighted probability that the current drilling condition isfavorable meets or exceeds P %, then the MV setpoint is increased;otherwise, the setpoint is decreased. P is preferably specified by theoperator.

The new setpoint(s) for the manipulated variable or variables areimplemented in Step 44 and drilling parameters evolve as the state ofthe drilling system changes and a new steady state is approached in Step45.

Step 46 involves computation of values for the selected objectivefunctions. The validity of the computations may be compromised byformation changes, as described above, and also by transient effects indrilling system response. An example of the latter is provided in FIG.19, which shows a gradual increase in measured WOB after a change in BDVsetpoint. Note that the change in BDV is only fully reflected in the WOBmeasurement, and thus the penetration rate of the bit, afterapproximately 180 seconds has elapsed. If the average rate ofpenetration at the bit over that time period is 20 ft/hr, the bit willhave drilled one foot in the time required for steady state to beregained. If multiple setpoints are required to fully evaluate objectivefunctions, then several times that much rock will be drilled before anoptimal combination of parameters can be identified. The amount offootage drilled while gathering sufficient steady state data to use thecriteria of the two-step or three-step methods can easily be greaterthan the thickness of homogeneous portions of formations in thesubsurface. This severely limits the usefulness of the scanningapproach. If, in the interest of minimizing drilled footage whilescanning, objective functions are computed before steady stateconditions are attained, for example by assuming, as is common incurrent practice, that BDV and bit ROP are equivalent regardless of thetiming of changes to BDV, then objective functions will be computederroneously. This also severely limits the utility of the scanningapproach.

The present invention overcomes these difficulties through furtherapplication of the first order system model represented in FIG. 9 andEq. 7-8. Making the assumption that all CV affected by mechanical loadon the bit are proportional to bit ROP, it follows that

$\begin{matrix}{{{CV}\left( {{steady}\mspace{14mu}{state}} \right)} = {{{CV}\left( {t - {\Delta\; t}} \right)} + \frac{{{CV}(t)} - {{CV}\left( {t - {\Delta\; t}} \right)}}{\left( {1 - e^{- \frac{\Delta\; t}{\tau}}} \right)}}} & (30)\end{matrix}$

After each change to the BDV setpoint, the invention applies the aboveequation to the control variables of interest to test for convergence ofpredicted steady state values. Once converged, they are used to computethe objective functions of interest, at which point the next step in thescanning procedure can be executed. Using projected steady state valuesin this manner reduces the time and drilled footage consumed whileexecuting the scanning procedure, which in turn increases itseffectiveness and value.

Step 47 evaluates the current block position and determines if drillingneeds to be interrupted to add drill pipe. If not, steps 42 through 47are repeated. If so, the procedure proceeds to Step 48, in which theoptimization engine is disengaged and the responsibility for selectionof setpoints is returned to the driller.

Approaches for Simultaneously Varying BDV and RPM

The methodologies described above seek to optimize a single MV or CV bysystematically varying it while quantifying the effects on other CV andperformance indicators. The invention also comprises methods ofsimultaneous variation of multiple MV and CV to expedite multi-parameteroptimization. These methods regulate the mechanical power (MP) suppliedto the bit based on the hydraulic power (HP) supplied and impliedformation properties, as described below. The methods are particularlyuseful when subsurface strata are heterogeneous.

The mechanical power supplied to the bit is related to the simplifiedmechanical specific energy defined previously herein, and is given by:MP=K₆TOB ω_(b)  (31)

The differential torque (TOB) and bit rotation speed (ω_(b)) are asdefined previously, and the constant K₆ depends on the unit systememployed. FIG. 20 shows differential torque or, equivalently for caseswhere downhole motors are used, differential pressure, versus bit rotaryspeed (ω_(b)), wherein curves 8 represent points at which the mechanicalpower supplied to the bit is substantially constant. Arrows 10, 12 eachrepresent possible stepwise variations of TOB from a setpoint 14 on thecurve 8, and arrows 16, 18 each represent possible separate stepwisevariations of ω_(b) from the setpoint 14, each of which, doneindependently, results in a change to the mechanical power supplied tothe bit. Arrows 20, 22 in FIG. 21 each represent possible stepwisevariations of both TOB and ω_(b) from a setpoint 24 on the curve 8,wherein the variations 20, 22 may be carried out simultaneously and areselected such that the MP supplied to the bit remains substantiallyconstant as the relative contributions of TOB and ω_(b) to total MPchange. Control of MV and CV in this manner is advantageous forpreventing drilling dysfunctions such as accumulation of cuttings on thebit face, also referred to herein as bit balling, and lateral bitvibration, also referred to herein as bit whirl. Bit balling is likelywhen drilling soft formations with excessive TOB and insufficient ω_(b),since TOB is proportional to the size of the cuttings generated in agiven formation, and the size of the cuttings directly affects thetendency for accumulation on the bit face. Drilling such formations isthus best done with a proportionally higher contribution of ω_(b) to MP.Bit whirl, on the other hand, is likely when drilling hard formationwith insufficient TOB and excessive ω_(b). TOB is indicative of thelevel of engagement between the bit and the hole bottom, which, wheninsufficient, allows cutting forces that are inherently unbalanced asthe bit penetrates the rock to cause small lateral displacements which,in turn, increase the magnitude of the imbalance forces. The centrifugalforces that arise due to simultaneous rotation and translation of thebit are proportional to the square of ω_(b) and contribute to theself-perpetuation of this process. Drilling hard formations, then, isbest done using proportionally higher contributions of TOB to MP. Theinvention thus regulates relative contributions of TOB and ω_(b) to MPbased on formation strength by applying Eq. 31 and the followingexpression for bit speed:ω_(b) Formation Strength=K₇  (32)

The constant K₇ in the above acts as a scaling factor, or referencevalue, for the formation strength term and is preferably specified bythe operator.

Since formation strength is not generally known, parameters that areaffected by formation strength may be used in its stead. Examplesinclude simplified mechanical specific energy (Eq. 3), the bit wearparameter (Eq. 15) and the x-intercept of the bit ROP versus WOB curve(FIG. 12), which are all directly proportional to formation strength,and bit aggressiveness (Eq. 23) and the slope of the bit ROP versus WOBcurve (FIG. 12), which are inversely proportional to formation strength.

The hydraulic power supplied to the bit is related to the hydraulicspecific energy defined previously herein and is given by:

$\begin{matrix}{{HP} = {K_{7}\frac{\rho_{m}Q^{3}}{A_{b}A_{n}^{2}}}} & (33)\end{matrix}$

The flow rate (Q), bit area (A_(b)), drilling fluid density (ρ_(m)),total nozzle area (A_(n)) are as defined previously, and the constant K₇depends on the unit system.

The magnitude of the mechanical power input to the bit directly affectsthe volume of cuttings generated as drilling proceeds. The magnitude ofthe hydraulic power supplied to the bit directly affects its ability toclean the cutting structure and hole bottom. The MP input also directlyaffects the amount of heat generated at the bit-formation interfaceduring rock cutting, which in turn causes cutter temperature increaseand wear. The HP directly affects the convective heat transfer betweenthe cutting structure and the drilling fluid, which in turn affectscutter temperature and wear rate. Preferred embodiments of the inventionrecognize these balancing considerations and regulate the MP input basedon HP input such thatMP_(max)=K₈HP  (34)

The constant K₈ in the above expression is preferably specified by theoperator.

FIG. 22 again presents the TOB versus ω_(b) curves at different levelsof MP with curve 8 as described above and in which arrows 26, 28 eachrepresent possible stepwise variations of TOB and ω_(b) from a setpoint30 on the curve 8, wherein the variations 26, 28 may be carried outsimultaneously and are selected such that the power supplied to thedrilling assembly varies substantially linearly with the variations 26,28, and where variations 26, 28 are linked to variations in HP providedto the bit as per Eq. 34.

The present invention is not limited to the embodiments described above.Therein, various modifications are conceivable within the scope of theappended claims. Alternatively, features of respective embodiments maybe combined.

The invention claimed is:
 1. A system for controlling a drillingassembly comprising a self-tuning, multivariable controller and anoptimization engine, wherein said multivariable controller detects aplurality of drilling variables and adjusts the performance of saiddrilling assembly based on said plurality of drilling variables andwherein said optimization engine manipulates controller setpoints tooptimize drilling parameters based on at least one performanceindicator, wherein the at least one performance indicator includes agradient of a bit rate of penetration versus weight on bit response. 2.The system of claim 1 wherein performance adjustment of saidself-tuning, multivariable controller uses at least one manipulatedvariable wherein said manipulated variable is at least one of aproportional variable, integral variable, and differential variable. 3.The system of claim 2 wherein said at least one manipulated variablecomprises one of block descent velocity, drillstring rotation speed, andpump strokes per minute.
 4. A system for controlling a drilling assemblycomprising a self-tuning, multivariable controller, wherein saidmultivariable controller detects a plurality of drilling variables andadjusts the performance of said drilling assembly based on saidplurality of drilling variables and wherein said system automaticallyadjusts said setpoints using a system of equations:${{Target}\mspace{14mu}{Set}\mspace{14mu}{Point}} = {{TSP} = {{\frac{K_{1}}{100}I} - {K_{2}\frac{V}{2}}}}$${{SP}(t)} = {{{SP}\left( {t - {DT}} \right)} + {\left\lbrack {{TSP} - {{SP}\left( {t - {DT}} \right)}} \right\rbrack K_{3}\frac{DT}{100}}}$${{SP}(t)} = {{minimum}\left\lbrack {{{SP}(t)},{\frac{K_{4}}{100}I}} \right\rbrack}$wherein TSP is a target setpoint, SP is a current setpoint, I is aninterlock value defining a limit, DT is an algorithm execution time, K₁is a user-specified maximum percentage of said interlock value I thatsaid setpoint can reach, K₂ is a user-specified parameter thatrepresents steady-state variation of a control variable, and K₃ is auser-specified parameter representing the rate at which said targetsetpoint is approached per second.
 5. A system for controlling adrilling assembly comprising a self-tuning, multivariable controller andan optimization engine, wherein said multivariable controller detects aplurality of drilling variables and adjusts the performance of saiddrilling assembly based on said plurality of drilling variables andwherein said optimization engine manipulates controller setpoints tooptimize drilling parameters based on at least one performanceindicator, wherein the at least one performance indicator includes adeviation of a bit (rate of penetration):(weight on bit) data pair froma linear best fit of bit (rate of penetration):(weight on bit) datapairs.
 6. A system for controlling a drilling assembly comprising aself-tuning, multivariable controller and an optimization engine,wherein said multivariable controller detects a plurality of drillingvariables and adjusts the performance of said drilling assembly based onsaid plurality of drilling variables and wherein said optimizationengine manipulates controller setpoints to optimize drilling parametersbased on at least one performance indicator, wherein the at least oneperformance indicator includes testing the bit rate of penetrationversus weight on a bit response for bit flounder using the followingcriterion:${\left( {{ROP}_{2} - {ROP}_{1}} \right)\left( {\frac{{ROP}_{2}}{{WOB}_{2}} - \frac{{ROP}_{1}}{{WOB}_{1}}} \right)} \geq 0$wherein ROP₁ is a first rate of penetration, ROP₂ is a second rate ofpenetration, WOB₁ is a first weight on bit, and WOB₂ is a second weighton bit.
 7. A system for controlling a drilling assembly comprising aself-tuning, multivariable controller and an optimization engine,wherein said multivariable controller detects a plurality of drillingvariables and adjusts the performance of said drilling assembly based onsaid plurality of drilling variables and wherein said optimizationengine manipulates controller setpoints to optimize drilling parametersbased on at least one performance indicator, wherein the at least oneperformance indicator includes a second order gradient of bit rate ofpenetration versus weight on bit.
 8. A system for controlling a drillingassembly comprising a self-tuning, multivariable controller and anoptimization engine, wherein said multivariable controller detects aplurality of drilling variables and adjusts the performance of saiddrilling assembly based on said plurality of drilling variables andwherein said optimization engine manipulates controller setpoints tooptimize drilling parameters based on at least one performanceindicator, wherein the at least one performance indicator includes a bitwear parameter as defined by:${WP} = \frac{\beta\;{WOB}\;\omega_{b}}{ROP}$ wherein WP is defined ascutter wear per distance drilled, WOB is defined as weight on bit, ROPis defined as rate of penetration, ω_(b) is defined as bit rotary speed,and β is a user-defined constant accounting for bit abrasiveness andgeometry considerations.
 9. A system for controlling a drilling assemblycomprising a self-tuning, multivariable controller and an optimizationengine, wherein said multivariable controller detects a plurality ofdrilling variables and adjusts the performance of said drilling assemblybased on said plurality of drilling variables and wherein saidoptimization engine manipulates controller setpoints to optimizedrilling parameters based on at least one performance indicator, whereinthe at least one performance indicator includes a gradient of acumulative cost per foot defined with respect to at least one of one oftime drilled and distance drilled as illustrated by a formula:$\frac{Cost}{Foot} = {\frac{{{Bit}\mspace{14mu}{Cost}} + {{Rig}\mspace{14mu}{{Rate}\left( {{{Drilling}\mspace{14mu}{Time}} + {{Trip}\mspace{14mu}{Time}}} \right)}}}{{Footage}\mspace{14mu}{Drilled}}.}$10. A system for controlling a drilling assembly comprising aself-tuning, multivariable controller and an optimization engine,wherein said multivariable controller detects a plurality of drillingvariables and adjusts the performance of said drilling assembly based onsaid plurality of drilling variables and wherein said optimizationengine manipulates controller setpoints to optimize drilling parametersbased on at least one performance indicator, wherein the at least oneperformance indicator includes a simplified mechanical specific energydefined in an equation:${SMSE} \equiv \frac{120\pi\; T\;\omega}{A_{b}{ROP}}$ wherein ROP isdefined as the rate of penetration, A_(b) defined as the area of thebit, ω is defined as one of bit rotary speed and surface rotary speed,and T is defined as torque.
 11. A system for controlling a drillingassembly comprising a self-tuning, multivariable controller and anoptimization engine, wherein said multivariable controller detects aplurality of drilling variables and adjusts the performance of saiddrilling assembly based on said plurality of drilling variables andwherein said optimization engine manipulates controller setpoints tooptimize drilling parameters based on at least one performanceindicator, wherein the at least one performance indicator includes ahydraulic specific energy defined in an equation:${HSE} = {K_{5}\frac{\rho_{m}Q^{3}}{A_{b}A_{n}^{2}{ROP}}}$ wherein Q isdefined as flow rate, ROP is defined as rate of penetration, A_(b) isdefined as bit area, ρ_(m) is defined as drilling fluid density, A_(n)is defined as total nozzle density, and K₅ is a user-defined constant.12. A method of optimizing drilling performance of a drilling assemblyfor drilling a borehole in an earth formation comprising the steps of:selecting a setpoint value of at least one variable drilling parameter;operating the drilling assembly to drill the borehole, wherein the atleast one variable drilling parameter is set at said setpoint value;determining the value of at least one performance indicator; selectingzero as the next setpoint for the block descent velocity; determining atleast one of a second and third value of the at least one performanceindicator using the formula:$\tau = {{{time}\mspace{14mu}{constant}} = {\frac{WOB}{ROP}\frac{L}{EA}}}$wherein WOB is defined as weight acting on a drill bit disposed on saiddrill assembly, ROP is defined as a rate at which said drill assemblypenetrates a drill site, L is defined as a length of a drill pipedefined by said drill assembly, E is defined as a modulus of elasticityof material comprising a drill pipe disposed on said drill assembly, Ais defined as a cross sectional area of said drill pipe; and, at leastone of the formulas:${{ROP}(t)} = {{f({BDV})} = {{{{BDV}(t)}\left( {1 - e^{- \frac{\Delta\; t}{\tau}}} \right)} + {{{ROP}\left( {t - {\Delta\; t}} \right)}\left( e^{- \frac{\Delta\; t}{\tau}} \right)}}}$wherein ROP^((t)) is defined as a rate at which said drill assemblypenetrates a drill site as a function of time, wherein said rate is afunction of the descent velocity of a block, denoted as BDV, in saiddrill assembly denoted as f(BDV), wherein$e^{- \frac{\Delta\; t}{\tau}}$ comprises error raised to an exponentequal to a change in time t divided by said time constant τ, ROP is arate of penetration of said drill assembly, t is a time of measurement,and Δt is a change in time; and,${{- 0.95}\frac{L}{EA}\frac{\Delta\;{WOB}}{\Delta\; t}} = {{bit}\mspace{14mu}{ROP}}$wherein said at least one formula varies said setpoint value of said atleast one variable drilling parameter based on the change in value ofthe at least one performance indicator.
 13. The method of claim 12wherein a change of drilling condition is identified by comparing the atleast one performance indicator with at least one standard deviation ofsaid at least one performance indicator.
 14. The method of claim 12wherein the at least one performance indicator includes process gain,K_(P) defined as: $K_{P} = \frac{CV}{f({BDV})}$ wherein CV denotes achosen control variable and f (BDV) denotes drill rate penetration as afunction of block descent velocity.
 15. The method of claim 12 whereinthe at least one performance indicator includes bit aggressiveness, μ,defined as: ${Aggressiveness} = {\mu = \frac{3\; T}{D_{b}{WOB}}}$wherein WOB is defined as weight on bit, D_(b) is defined as bitdiameter, and T is defined as one of torque on bit and surface torque.16. A method of optimizing drilling performance of a drilling assemblyfor drilling a borehole in an earth formation using a system forcontrolling the drilling assembly, comprising the steps of: selecting asetpoint value of at least one variable drilling parameter; operatingthe drilling assembly to drill the borehole, wherein the at least onevariable drilling parameter is set at the setpoint value; determiningthe value of mechanical power input to the bit; determining the value ofhydraulic power input to the bit; varying the setpoint value of said atleast one variable drilling parameter such that mechanical power andhydraulic power are related as per the equation:MP_(max)=K₈HP wherein MP_(max) is defined as maximum mechanical powerinput, HP is defined as hydraulic power input, and K₈ is auser-controlled constant, wherein said system comprises a self-tuning,multivariable controller, wherein said multivariable controller detectsa plurality of drilling variables and adjusts the performance of saiddrilling assembly based on said plurality of drilling variables andwherein said system automatically adjusts said setpoints using a systemof equations:${{Target}\mspace{14mu}{Set}\mspace{14mu}{Point}} = {{TSP} = {{\frac{K_{1}}{100}I} - {K_{2}\frac{V}{2}}}}$${{SP}(t)} = {{{SP}\left( {t - {DT}} \right)} + {\left\lbrack {{TSP} - {{SP}\left( {t - {DT}} \right)}} \right\rbrack K_{3}\frac{DT}{100}}}$${{SP}(t)} = {{minimum}\left\lbrack {{{SP}(t)},{\frac{K_{4}}{100}I}} \right\rbrack}$wherein TSP is a target setpoint, SP is a current setpoint, I is aninterlock value defining a limit, DT is an algorithm execution time, K₁is a user-specified maximum percentage of said interlock value I thatsaid setpoint can reach, K₂ is a user-specified parameter thatrepresents steady-state variation of the control variable, and K₃ is auser-specified parameter representing the rate at which said targetsetpoint is approached per second.